package com.panghu.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panghu.entity.Message;
import com.panghu.entity.Replay;
import com.panghu.mapper.MessageMapper;
import com.panghu.mapper.ReplayMapper;
import com.panghu.service.MessageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panghu.service.ReplayService;
import com.panghu.utils.ApiResultHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 留言表 服务实现类
 * </p>
 *
 * @author huahua
 * @since 2022-03-19
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {

    @Resource
    private MessageMapper messageMapper;

    //根据id进行单个评论查询 id为主评论id
    @Override
    public Message findById(Integer id) {
        return messageMapper.findById(id);
    }

    @Override
    public IPage<Message> findAll(Page<Message> page) {
        return messageMapper.findAll(page);
    }






}
